//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.interview.rtc.aigc.service;


import com.interview.rtc.aigc.utils.AIGCConfig;
import com.volcengine.error.SdkError;
import com.volcengine.model.response.RawResponse;
import com.volcengine.service.BaseServiceImpl;

public class AIGCServiceImpl extends BaseServiceImpl {
    private static final AIGCServiceImpl rtcServiceImplInstance = new AIGCServiceImpl();

    private AIGCServiceImpl() {
        super(AIGCConfig.serviceInfo, AIGCConfig.apiInfoList);
    }


    public static AIGCServiceImpl getInstance() {
        return rtcServiceImplInstance;
    }

    public RawResponse StartVoiceChat(String params ) throws Exception {
         RawResponse response = this.json("StartVoiceChat",null,params);

        if (response.getCode() != SdkError.SUCCESS.getNumber()) {
            throw response.getException();
        } else {
            return response;
        }
    }

    public RawResponse stopVoiceChat(String params) throws Exception {
        RawResponse response = this.json("StopVoiceChat",null,params);
        if (response.getCode() != SdkError.SUCCESS.getNumber()) {
            throw response.getException();
        } else {
            return response;
        }
    }
}
